import React, {Component} from 'react'
import {connect} from 'react-redux'

import {
  odooActionCreators,
  ListViewActions
} from '../redux'
import Posts from '../components/Posts'

const mapStateToProps = (state) => ({
  datas: state.odoo.videoDatas,
  loading: state.odoo.videoLoading,
  tag: 'video'
})

const mapDispatchToProps = (dispatch) => ({
  onRefresh: () => {
    dispatch(odooActionCreators.getVideos(ListViewActions.REFRESH))
  },
  onLoadMore: () => {
    dispatch(odooActionCreators.getVideos(ListViewActions.LOADMORE))
  }
})

export default connect(mapStateToProps,mapDispatchToProps)(Posts)
